package priv.project.pojo;/**
 * @author： li
 * @date： 2023-02-14 16:06
 * @version 1.0
 */

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * @author： ljm
 * @date： 2023-02-14 16:06
 * @version 1.0
 */
@TableName("t_comment")
public class Comment {
    private int id;
    private int userId;
    private int strategyId;
    private int commentId;
    private String content;
    private Date createDate;
    @TableField(exist = false)
    private User user;
    @TableField(exist = false)
    private Strategy strategy;
    @TableField(exist = false)
    private List<Comment> subComments;
    public Comment() {
    }

    public Comment(int id, int userId, int strategyId, int commentId, String content, Date createDate) {
        this.id = id;
        this.userId = userId;
        this.strategyId = strategyId;
        this.commentId = commentId;
        this.content = content;
        this.createDate = createDate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getStrategyId() {
        return strategyId;
    }

    public void setStrategyId(int strategyId) {
        this.strategyId = strategyId;
    }

    public int getCommentId() {
        return commentId;
    }

    public void setCommentId(int commentId) {
        this.commentId = commentId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public List<Comment> getSubComments() {
        return subComments;
    }

    public void setSubComments(List<Comment> subComments) {
        this.subComments = subComments;
    }
    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", userId=" + userId +
                ", strategyId=" + strategyId +
                ", commentId=" + commentId +
                ", content='" + content + '\'' +
                ", createDate=" + createDate +
                ", subComments=" + subComments +
                '}';
    }

}
